//
//  TTCorePath.m
//  Tint
//
//  Created by Kevin Wu on 2/22/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import "TTCorePath.h"


#pragma mark - System path

NSString *TTDocumentsPath(void) {
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    if ([paths count]>0)
        return [paths objectAtIndex:0];
    return nil;
}

NSString *TTLibraryPath(void) {
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
    if ([paths count]>0)
        return [paths objectAtIndex:0];
    return nil;
}

NSString *TTCachesPath(void) {
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
    if ([paths count]>0)
        return [paths objectAtIndex:0];
    return nil;
}

NSString *TTBundlePath(void) {
    return [[NSBundle mainBundle] bundlePath];
}
